﻿@page
@model WXWorkSvc.Areas.Admin.Pages.Suite.IndexModel

@{
    ViewData["Title"] = "套件";
}
<h4>@ViewData["Title"]</h4>
<hr />
<p>
    <a asp-page="Create">Create New</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.TSuite[0].Id)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.TSuite[0].Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.TSuite[0].Url)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.TSuite[0].DTTicket)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.TSuite[0].DTTokenExpires)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.TSuite)
        {
            <tr>
                <td title="@($"Secret:{item.Secret}\r\nToken:{item.Token}\r\nTicket:{item.Ticket}")">
                    @Html.DisplayFor(modelItem => item.Id)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Url)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DTTicket)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DTTokenExpires)
                </td>
                <td>
                    <a asp-page="./Edit" asp-route-id="@item.Id">Edit</a> |
                    <a asp-page="./Delete" asp-route-id="@item.Id">Delete</a>
                </td>
            </tr>
        }
    </tbody>
</table>
